-
Notifications
You must be signed in to change notification settings - Fork 4
CFM-324_Attribute_Collector_Enroller_Plugin_store_cou_id_in_petition #399
Merged
benno
merged 9 commits into
COmanage:develop
from
Ioannis:CFM-324_Attribute_Collector_Enroller_Plugin_store_cou_id_in_petition
Oct 22, 2026
Merged
CFM-324_Attribute_Collector_Enroller_Plugin_store_cou_id_in_petition #399
benno
merged 9 commits into
COmanage:develop
from
Ioannis:CFM-324_Attribute_Collector_Enroller_Plugin_store_cou_id_in_petition
Oct 22, 2026
+407
−13
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benno
reviewed
May 9, 2026
app/plugins/CoreEnroller/src/Controller/AttributeCollectorsController.php
Show resolved
Hide resolved
04aab88 to
aec7633
Compare
618121b to
be4d8b6
Compare
37716af to
44a7fe9
Compare
Contributor
Author
1bc8768 to
375d221
Compare
6f834ce to
f06b08d
Compare
… attribute pre-population
…ps and match pre-fill by type
… overwrite an existing Petition COU
…OU Selector) and enforce it server side
189f989 to
ceda5ae
Compare
benno
reviewed
Oct 21, 2026
Contributor
benno
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had one or two other comments, but I think you may have already rewritten the code I was going to comment on.
app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php
Outdated
Show resolved
Hide resolved
app/plugins/CoreEnroller/src/Model/Table/AttributeCollectorsTable.php
Outdated
Show resolved
Hide resolved
…elector step instead of comparing collected values
Contributor
Author
|
@benno review comments addressed. |
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configuration Level:
At the configuration level, the changes enforce data integrity by introducing an application business rule (ruleSingleValuedAttributeUnique) in EnrollmentAttributesTable. This rule prevents administrators from adding duplicate single-valued Person and Person Role attributes (such as cou_id, affiliation_type_id, title, department, organization, sponsor_person_id, manager_person_id, valid_from, and valid_through) within the same Attribute Collector plugin instance, rejecting conflicting duplicates with a localized error message.
Runtime Collection & Hydration Level:
During enrollment flow execution, the changes enable seamless cross-step attribute pre-population and preserve single Person Role consolidation. In AttributeCollectorsController and form rendering elements (field.php, fieldset-field.php), previously submitted petition values are matched by attribute name across steps, allowing subsequent Attribute Collector steps to display earlier values as editable defaults while updating Petition.cou_id deterministically for the active step. During finalization (hydrate), querying is scoped to the current step instance, and PersonRolesTable::saveAttributeCollectorPetitionAttributes() patches an existing non-pipeline PersonRole (or resolves it for role-level MVEAs) rather than creating new records on every step, guaranteeing that all Attribute Collector steps merge into exactly one unified Person Role for the enrollee.